#ifndef VIEW_COMPONENT_CPANELLOGGER_H_
#define VIEW_COMPONENT_CPANELLOGGER_H_

#include "core/logger.h"
#include "CPanelWidget.h"

class CPanelLogger : public CPanelWidget, public ILoggerObserver
{
    Q_OBJECT
public:
    CPanelLogger(QWidget *parent = nullptr);
    ~CPanelLogger();

    // impl
    void notify(int level, const std::string &msg) override;

    void appendMessage(int level, QString msg);

public slots:
    void eventDeviceChanged(QString id);

signals:
    void messageNotify(int level, QString msg);

private:
    class CPanelLoggerPrivate;
    CPanelLoggerPrivate *p_;
};

#endif // VIEW_COMPONENT_CPANELLOGGER_H_